﻿-- =============================================
-- LoadBindings.sql
-- =============================================

--Binding
DECLARE @BindingName nvarchar(400)
DECLARE @BindingDescription nvarchar(400)
DECLARE @BindingID uniqueidentifier

--BindingElements
DECLARE @BindingElementName nvarchar(400)
DECLARE @BindingElementDescription nvarchar(400)
DECLARE @BindingElementConfig xml
DECLARE @ElementType smallint
DECLARE @BE_ID_1 uniqueidentifier
DECLARE @BE_ID_2 uniqueidentifier
DECLARE @BE_ID_3 uniqueidentifier
DECLARE @BE_ID_4 uniqueidentifier
DECLARE @BE_ID_5 uniqueidentifier

-- *** Binding #1 BasicHttp (Soap11)

set @BindingName='BasicHttp (Soap11)'
set @BindingDescription = N'BasicHttp Binding with Soap11 Message Version. Please do not modify or delete as this is a system generated Binding used by different MSE system modules.'
set @BindingID = '{00000000-0000-0000-0000-B00000000001}'

 EXEC	[ServiceEngine].[CreateBinding]
		@BindingName,
		@BindingDescription,
		@BindingID OUTPUT
		
set @BindingElementName = 'basicHttpBinding'
set @ElementType = 0
set @BindingElementDescription = N'BasicHttp Binding.'
set @BindingElementConfig = N'<basicHttpBinding></basicHttpBinding>'
set @BE_ID_1 = '{00000000-0000-0000-0000-BE0000000001}'
		
EXEC	[ServiceEngine].[CreateBindingElement]
		@BindingElementName,
		@BindingElementConfig,
		@ElementType,
		@BindingElementDescription,
		@BE_ID_1 OUTPUT			
		
set @BindingElementName = 'basicHttp'
set @ElementType = 1
set @BindingElementDescription = N'BasicHttp Binding with Soap11 Message Version Binding Element. Please do not modify or delete as this is a system generated Binding used by different MSE system modules.'
set @BindingElementConfig = N'<binding name="basicHttp" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
    </binding>'
set @BE_ID_2 = '{00000000-0000-0000-0000-BE0000000002}'
		
EXEC	[ServiceEngine].[CreateBindingElement]
		@BindingElementName,
		@BindingElementConfig,
		@ElementType,
		@BindingElementDescription,
		@BE_ID_2 OUTPUT		

set @BindingElementName = 'readerQuotas'
set @ElementType = 2
set @BindingElementDescription = N'readerQuotas Binding Element'
set @BindingElementConfig = N'<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />'
set @BE_ID_3 = '{00000000-0000-0000-0000-BE0000000003}'
		
EXEC	[ServiceEngine].[CreateBindingElement]
		@BindingElementName,
		@BindingElementConfig,
		@ElementType,
		@BindingElementDescription,
		@BE_ID_3 OUTPUT	
		
set @BindingElementName = 'security'
set @ElementType = 2
set @BindingElementDescription = N'readerQuotas Binding Element'
set @BindingElementConfig = N'<security mode="None">
        <transport clientCredentialType="None" proxyCredentialType="None" realm="" />
        <message clientCredentialType="UserName" algorithmSuite="Default" />
      </security>'
set @BE_ID_4 = '{00000000-0000-0000-0000-BE0000000004}'
		
EXEC	[ServiceEngine].[CreateBindingElement]
		@BindingElementName,
		@BindingElementConfig,
		@ElementType,
		@BindingElementDescription,
		@BE_ID_4 OUTPUT	
		
EXEC	[ServiceEngine].[AssignBindingElementsToBinding]
		@BindingID,
		@BE_ID_1,
		0		
EXEC	[ServiceEngine].[AssignBindingElementsToBinding]
		@BindingID,
		@BE_ID_2,
		1
EXEC	[ServiceEngine].[AssignBindingElementsToBinding]
		@BindingID,
		@BE_ID_3,
		2				
		
EXEC	[ServiceEngine].[AssignBindingElementsToBinding]
		@BindingID,
		@BE_ID_4,
		3			
		
-- *** Binding #2 BasicHttp (Soap12)

set @BindingName='BasicHttp (Soap12)'
set @BindingDescription = N'BasicHttp Binding with Soap12 Message Version. Please do not modify or delete as this is a system generated Binding used by different MSE system modules.'
set @BindingID = '{00000000-0000-0000-0000-B00000000002}'

 EXEC	[ServiceEngine].[CreateBinding]
		@BindingName,
		@BindingDescription,
		@BindingID OUTPUT
		
set @BindingElementName = 'BasicHttp (Soap12)'
set @ElementType = 0
set @BindingElementDescription = N'BasicHttp Binding with Soap12 Message Version Binding Element. Please do not modify or delete as this is a system generated Binding used by different MSE system modules.'
set @BindingElementConfig = N'<customBinding></customBinding>'
set @BE_ID_1 = '{00000000-0000-0000-0000-BE0000000005}'
		
EXEC	[ServiceEngine].[CreateBindingElement]
		@BindingElementName,
		@BindingElementConfig,
		@ElementType,
		@BindingElementDescription,
		@BE_ID_1 OUTPUT			
		
set @BindingElementName = 'svcSoap12'
set @ElementType = 1
set @BindingElementDescription = N'BasicHttp Binding with Soap12 Message Version Binding Element. Please do not modify or delete as this is a system generated Binding used by different MSE system modules.'
set @BindingElementConfig = N'<binding name="svcSoap12">
    </binding>'
set @BE_ID_2 = '{00000000-0000-0000-0000-BE0000000006}'
		
EXEC	[ServiceEngine].[CreateBindingElement]
		@BindingElementName,
		@BindingElementConfig,
		@ElementType,
		@BindingElementDescription,
		@BE_ID_2 OUTPUT		

set @BindingElementName = 'textMessageEncoding'
set @ElementType = 2
set @BindingElementDescription = N'textMessageEncoding Binding Element'
set @BindingElementConfig = N'<textMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16" messageVersion="Soap12" writeEncoding="utf-8">
        <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
      </textMessageEncoding>'
set @BE_ID_3 = '{00000000-0000-0000-0000-BE0000000007}'
		
EXEC	[ServiceEngine].[CreateBindingElement]
		@BindingElementName,
		@BindingElementConfig,
		@ElementType,
		@BindingElementDescription,
		@BE_ID_3 OUTPUT	
		
set @BindingElementName = 'httpTransport'
set @ElementType = 2
set @BindingElementDescription = N'httpTransport Binding Element'
set @BindingElementConfig = N'<httpTransport manualAddressing="false" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" allowCookies="false" authenticationScheme="Anonymous" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" keepAliveEnabled="true" maxBufferSize="65536" proxyAuthenticationScheme="Anonymous" realm="" transferMode="Buffered" unsafeConnectionNtlmAuthentication="false" useDefaultWebProxy="true" />'
set @BE_ID_4 = '{00000000-0000-0000-0000-BE0000000008}'
		
EXEC	[ServiceEngine].[CreateBindingElement]
		@BindingElementName,
		@BindingElementConfig,
		@ElementType,
		@BindingElementDescription,
		@BE_ID_4 OUTPUT	
		
EXEC	[ServiceEngine].[AssignBindingElementsToBinding]
		@BindingID,
		@BE_ID_1,
		0		
EXEC	[ServiceEngine].[AssignBindingElementsToBinding]
		@BindingID,
		@BE_ID_2,
		1
EXEC	[ServiceEngine].[AssignBindingElementsToBinding]
		@BindingID,
		@BE_ID_3,
		2	
		
EXEC	[ServiceEngine].[AssignBindingElementsToBinding]
		@BindingID,
		@BE_ID_4,
		3		
		
-- *** Binding #3 WsHttp (Soap11)	

set @BindingName='WsHttp (Soap11)'
set @BindingDescription = N'WsHttp Binding with Soap11 Message Version. Please do not modify or delete as this is a system generated Binding used by different MSE system modules.'
set @BindingID = '{00000000-0000-0000-0000-B00000000003}'

 EXEC	[ServiceEngine].[CreateBinding]
		@BindingName,
		@BindingDescription,
		@BindingID OUTPUT
		
set @BE_ID_1 = '{00000000-0000-0000-0000-BE0000000005}'	
		
set @BindingElementName = 'wsHttpSoap11'
set @ElementType = 1
set @BindingElementDescription = N'WsHttp Binding with Soap11 Message Version Binding Element. Please do not modify or delete as this is a system generated Binding used by different MSE system modules.'
set @BindingElementConfig = N'<binding name="wsHttpSoap11" ></binding>'
set @BE_ID_2 = '{00000000-0000-0000-0000-BE0000000009}'
		
EXEC	[ServiceEngine].[CreateBindingElement]
		@BindingElementName,
		@BindingElementConfig,
		@ElementType,
		@BindingElementDescription,
		@BE_ID_2 OUTPUT			

set @BindingElementName = 'textMessageEncoding WsHttp (Soap11)'
set @ElementType = 2
set @BindingElementDescription = N'textMessageEncoding Binding Element WsHttp (Soap11)'
set @BindingElementConfig = N'<textMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16"  messageVersion="Soap11WSAddressing10" writeEncoding="utf-8">
      <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
      </textMessageEncoding> '
set @BE_ID_3 = '{00000000-0000-0000-0000-BE0000000010}'

set @BE_ID_4 = '{00000000-0000-0000-0000-BE0000000008}'
		
EXEC	[ServiceEngine].[CreateBindingElement]
		@BindingElementName,
		@BindingElementConfig,
		@ElementType,
		@BindingElementDescription,
		@BE_ID_3 OUTPUT	
		
EXEC	[ServiceEngine].[AssignBindingElementsToBinding]
		@BindingID,
		@BE_ID_1,
		0		
EXEC	[ServiceEngine].[AssignBindingElementsToBinding]
		@BindingID,
		@BE_ID_2,
		1
EXEC	[ServiceEngine].[AssignBindingElementsToBinding]
		@BindingID,
		@BE_ID_3,
		2	

EXEC	[ServiceEngine].[AssignBindingElementsToBinding]
		@BindingID,
		@BE_ID_4,
		3
		
-- *** Binding #4 WsHttp (Soap12)	
set @BindingName='WsHttp (Soap12)'
set @BindingDescription = N'WsHttp Binding with Soap12 Message Version. Please do not modify or delete as this is a system generated Binding used by different MSE system modules.'
set @BindingID = '{00000000-0000-0000-0000-B00000000004}'

 EXEC	[ServiceEngine].[CreateBinding]
		@BindingName,
		@BindingDescription,
		@BindingID OUTPUT
		
		
set @BindingElementName = 'WsHttp (Soap12)'
set @ElementType = 0
set @BindingElementDescription = N'WsHttp Binding with Soap12 Message Version Binding Element. Please do not modify or delete as this is a system generated Binding used by different MSE system modules.'
set @BindingElementConfig = N'<wsHttpBinding></wsHttpBinding>'
set @BE_ID_1 = '{00000000-0000-0000-0000-BE0000000011}'
		
EXEC	[ServiceEngine].[CreateBindingElement]
		@BindingElementName,
		@BindingElementConfig,
		@ElementType,
		@BindingElementDescription,
		@BE_ID_1 OUTPUT			
		
set @BindingElementName = 'wsHttp'
set @ElementType = 1
set @BindingElementDescription = N'WsHttp Binding with Soap12 Message Version Binding Element. Please do not modify or delete as this is a system generated Binding used by different MSE system modules.'
set @BindingElementConfig = N'<binding name="wsHttp" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
    </binding>'
set @BE_ID_2 = '{00000000-0000-0000-0000-BE0000000012}'
		
EXEC	[ServiceEngine].[CreateBindingElement]
		@BindingElementName,
		@BindingElementConfig,
		@ElementType,
		@BindingElementDescription,
		@BE_ID_2 OUTPUT		

set @BE_ID_3 = '{00000000-0000-0000-0000-BE0000000003}'

set @BindingElementName = 'reliableSession'
set @ElementType = 2
set @BindingElementDescription = N'reliableSession Binding Element'
set @BindingElementConfig = N'<reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" />'
set @BE_ID_4 = '{00000000-0000-0000-0000-BE0000000013}'
		
EXEC	[ServiceEngine].[CreateBindingElement]
		@BindingElementName,
		@BindingElementConfig,
		@ElementType,
		@BindingElementDescription,
		@BE_ID_4 OUTPUT	
		
set @BindingElementName = 'security WsHttp (Soap12)'
set @ElementType = 2
set @BindingElementDescription = N'security Binding Element'
set @BindingElementConfig = N'<security mode="None">
        <transport clientCredentialType="Windows" proxyCredentialType="None" realm="" />
        <message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default" establishSecurityContext="true" />
      </security>'
set @BE_ID_5 = '{00000000-0000-0000-0000-BE0000000014}'
		
EXEC	[ServiceEngine].[CreateBindingElement]
		@BindingElementName,
		@BindingElementConfig,
		@ElementType,
		@BindingElementDescription,
		@BE_ID_5 OUTPUT	
		
EXEC	[ServiceEngine].[AssignBindingElementsToBinding]
		@BindingID,
		@BE_ID_1,
		0
EXEC	[ServiceEngine].[AssignBindingElementsToBinding]
		@BindingID,
		@BE_ID_2,
		1				
EXEC	[ServiceEngine].[AssignBindingElementsToBinding]
		@BindingID,
		@BE_ID_3,
		2
EXEC	[ServiceEngine].[AssignBindingElementsToBinding]
		@BindingID,
		@BE_ID_4,
		3	
EXEC	[ServiceEngine].[AssignBindingElementsToBinding]
		@BindingID,
		@BE_ID_5,
		4

-- *** Binding #5 NetNamedPipe

set @BindingName='NetNamedPipe'
set @BindingDescription = N'NetNamedPipe Binding. Please do not modify or delete as this is a system generated Binding used by different MSE system modules.'
set @BindingID = '{00000000-0000-0000-0000-B00000000005}'

 EXEC	[ServiceEngine].[CreateBinding]
		@BindingName,
		@BindingDescription,
		@BindingID OUTPUT
		
set @BindingElementName = 'NetNamedPipe'
set @ElementType = 0
set @BindingElementDescription = N'NetNamedPipe Binding Element. Please do not modify or delete as this is a system generated Binding used by different MSE system modules.'
set @BindingElementConfig = N'<netNamedPipeBinding></netNamedPipeBinding>'
set @BE_ID_1 = '{00000000-0000-0000-0000-BE0000000015}'
		
EXEC	[ServiceEngine].[CreateBindingElement]
		@BindingElementName,
		@BindingElementConfig,
		@ElementType,
		@BindingElementDescription,
		@BE_ID_1 OUTPUT	
				
set @BindingElementName = 'NetPipe'
set @ElementType = 1
set @BindingElementDescription = N'NetNamedPipe Binding Element. Please do not modify or delete as this is a system generated Binding used by different MSE system modules.'
set @BindingElementConfig = N'<binding name="NetPipe" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxBufferSize="65536" maxConnections="10" maxReceivedMessageSize="65536">
    </binding>'
set @BE_ID_2 = '{00000000-0000-0000-0000-BE0000000016}'
		
EXEC	[ServiceEngine].[CreateBindingElement]
		@BindingElementName,
		@BindingElementConfig,
		@ElementType,
		@BindingElementDescription,
		@BE_ID_2 OUTPUT		
		
set @BE_ID_3 = '{00000000-0000-0000-0000-BE0000000003}'		

set @BindingElementName = 'security NetNamedPipe'
set @ElementType = 2
set @BindingElementDescription = N'security Binding Element'
set @BindingElementConfig = N'<security mode="Transport">
        <transport protectionLevel="EncryptAndSign" />
      </security>'
set @BE_ID_4 = '{00000000-0000-0000-0000-BE0000000017}'
		
EXEC	[ServiceEngine].[CreateBindingElement]
		@BindingElementName,
		@BindingElementConfig,
		@ElementType,
		@BindingElementDescription,
		@BE_ID_4 OUTPUT	
		
EXEC	[ServiceEngine].[AssignBindingElementsToBinding]
		@BindingID,
		@BE_ID_1,
		0
EXEC	[ServiceEngine].[AssignBindingElementsToBinding]
		@BindingID,
		@BE_ID_2,
		1				
EXEC	[ServiceEngine].[AssignBindingElementsToBinding]
		@BindingID,
		@BE_ID_3,
		2
EXEC	[ServiceEngine].[AssignBindingElementsToBinding]
		@BindingID,
		@BE_ID_4,
		3

-- *** Binding #6 NetTcp
set @BindingName='NetTcp'
set @BindingDescription = N'NetTcp Binding. Please do not modify or delete as this is a system generated Binding used by different MSE system modules.'
set @BindingID = '{00000000-0000-0000-0000-B00000000006}'

 EXEC	[ServiceEngine].[CreateBinding]
		@BindingName,
		@BindingDescription,
		@BindingID OUTPUT
		
set @BindingElementName = 'netTcpBinding'
set @ElementType = 0
set @BindingElementDescription = N'NetTcp Binding Element. Please do not modify or delete as this is a system generated Binding used by different MSE system modules.'
set @BindingElementConfig = N'<netTcpBinding></netTcpBinding>'
set @BE_ID_1 = '{00000000-0000-0000-0000-BE0000000018}'
		
EXEC	[ServiceEngine].[CreateBindingElement]
		@BindingElementName,
		@BindingElementConfig,
		@ElementType,
		@BindingElementDescription,
		@BE_ID_1 OUTPUT		
		
set @BindingElementName = 'netTcp'
set @ElementType = 1
set @BindingElementDescription = N'NetTcp Binding Element. Please do not modify or delete as this is a system generated Binding used by different MSE system modules.'
set @BindingElementConfig = N'<binding name="netTcp" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" listenBacklog="10" maxBufferPoolSize="524288" maxBufferSize="65536" maxConnections="10" maxReceivedMessageSize="65536">
    </binding>'
set @BE_ID_2 = '{00000000-0000-0000-0000-BE0000000019}'
		
EXEC	[ServiceEngine].[CreateBindingElement]
		@BindingElementName,
		@BindingElementConfig,
		@ElementType,
		@BindingElementDescription,
		@BE_ID_2 OUTPUT			

set @BE_ID_3 = '{00000000-0000-0000-0000-BE0000000003}'	
set @BE_ID_4 = '{00000000-0000-0000-0000-BE0000000013}'

set @BindingElementName = 'security NetTcp'
set @ElementType = 2
set @BindingElementDescription = N'security Binding Element'
set @BindingElementConfig = N'<security mode="Transport">
        <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
        <message clientCredentialType="Windows" />
      </security>'
set @BE_ID_5 = '{00000000-0000-0000-0000-BE0000000020}'
		
EXEC	[ServiceEngine].[CreateBindingElement]
		@BindingElementName,
		@BindingElementConfig,
		@ElementType,
		@BindingElementDescription,
		@BE_ID_5 OUTPUT	
		
EXEC	[ServiceEngine].[AssignBindingElementsToBinding]
		@BindingID,
		@BE_ID_1,
		0
EXEC	[ServiceEngine].[AssignBindingElementsToBinding]
		@BindingID,
		@BE_ID_2,
		1	
EXEC	[ServiceEngine].[AssignBindingElementsToBinding]
		@BindingID,
		@BE_ID_3,
		2						
EXEC	[ServiceEngine].[AssignBindingElementsToBinding]
		@BindingID,
		@BE_ID_4,
		3
		
EXEC	[ServiceEngine].[AssignBindingElementsToBinding]
		@BindingID,
		@BE_ID_5,
		4		

-- *** Binding #7 POX

set @BindingName='POX'
set @BindingDescription = N'POX Binding. Please do not modify or delete as this is a system generated Binding used by different MSE system modules.'
set @BindingID = '{00000000-0000-0000-0000-B00000000007}'

 EXEC	[ServiceEngine].[CreateBinding]
		@BindingName,
		@BindingDescription,
		@BindingID OUTPUT
		
set @BE_ID_1 = '{00000000-0000-0000-0000-BE0000000005}'	

set @BindingElementName = 'poxBinding'
set @ElementType = 1
set @BindingElementDescription = N'POX Binding Element. Please do not modify or delete as this is a system generated Binding used by different MSE system modules.'
set @BindingElementConfig = N'<binding name="poxBinding" />'
set @BE_ID_2 = '{00000000-0000-0000-0000-BE0000000021}'
		
EXEC	[ServiceEngine].[CreateBindingElement]
		@BindingElementName,
		@BindingElementConfig,
		@ElementType,
		@BindingElementDescription,
		@BE_ID_2 OUTPUT		

set @BindingElementName = 'textMessageEncoding POX'
set @ElementType = 2
set @BindingElementDescription = N'textMessageEncoding Binding Element'
set @BindingElementConfig = N'<textMessageEncoding messageVersion="None">
      </textMessageEncoding>'
set @BE_ID_3 = '{00000000-0000-0000-0000-BE0000000022}'
		
EXEC	[ServiceEngine].[CreateBindingElement]
		@BindingElementName,
		@BindingElementConfig,
		@ElementType,
		@BindingElementDescription,
		@BE_ID_3 OUTPUT	
		
set @BindingElementName = 'httpTransport POX'
set @ElementType = 2
set @BindingElementDescription = N'httpTransport Binding Element'
set @BindingElementConfig = N'<httpTransport>
      </httpTransport>'
set @BE_ID_4 = '{00000000-0000-0000-0000-BE0000000023}'
		
EXEC	[ServiceEngine].[CreateBindingElement]
		@BindingElementName,
		@BindingElementConfig,
		@ElementType,
		@BindingElementDescription,
		@BE_ID_4 OUTPUT			
		
EXEC	[ServiceEngine].[AssignBindingElementsToBinding]
		@BindingID,
		@BE_ID_1,
		0
								
EXEC	[ServiceEngine].[AssignBindingElementsToBinding]
		@BindingID,
		@BE_ID_2,
		1
EXEC	[ServiceEngine].[AssignBindingElementsToBinding]
		@BindingID,
		@BE_ID_3,
		2	
		
EXEC	[ServiceEngine].[AssignBindingElementsToBinding]
		@BindingID,
		@BE_ID_4,
		3		

-- *** Binding #8 SQLServer (WCF SQL Adaptor needs to be installed for this binding to work)

--set @BindingName='SQL Server LOB Channel'
--set @BindingDescription = N'SQL Server Binding. Please do not modify or delete as this is a system generated Binding used by different MSE system modules.'
--set @BindingID = '{00000000-0000-0000-0000-B00000000008}'

 --EXEC	[ServiceEngine].[CreateBinding]
		--@BindingName,
		--@BindingDescription,
		--@BindingID OUTPUT
		
--set @BindingElementName = 'Sql LOB Channel Binding'
--set @ElementType = 1
--set @BindingElementDescription = N'SQL Server Binding Element. Please do not modify or delete as this is a system generated Binding used by different MSE system modules.'
--set @BindingElementConfig = N'<binding name="SqlAdapterBinding" closeTimeout="00:01:00" openTimeout="00:01:00"
                    --receiveTimeout="Infinite" sendTimeout="00:01:00" batchSize="20"
                    --polledDataAvailableStatement="" pollingStatement="" pollingIntervalInSeconds="30"
                    --pollWhileDataFound="false" enableBizTalkCompatibilityMode="true"
                    --chunkSize="4194304" maxConnectionPoolSize="100" encrypt="false"
                    --useAmbientTransaction="true" />'
--set @BE_ID_2 = '{00000000-0000-0000-0000-BE0000000031}'
		
--EXEC	[ServiceEngine].[CreateBindingElement]
		--@BindingElementName,
		--@BindingElementConfig,
		--@ElementType,
		--@BindingElementDescription,
		--@BE_ID_2 OUTPUT		

--set @BindingElementName = 'Sql LOB Channel Transport'
--set @ElementType = 0
--set @BindingElementDescription = N'SqlTransport LOB Channel Binding Element'
--set @BindingElementConfig = N'<sqlBinding></sqlBinding>'
--set @BE_ID_3 = '{00000000-0000-0000-0000-BE0000000032}'
		
		
--EXEC	[ServiceEngine].[CreateBindingElement]
		--@BindingElementName,
		--@BindingElementConfig,
		--@ElementType,
		--@BindingElementDescription,
		--@BE_ID_3 OUTPUT			
		
--EXEC	[ServiceEngine].[AssignBindingElementsToBinding]
		--@BindingID,
		--@BE_ID_2,
		--0
--EXEC	[ServiceEngine].[AssignBindingElementsToBinding]
		--@BindingID,
		--@BE_ID_3,
		--1	
		
